package cn.zhou;

import java.util.Scanner;

public class test14 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入4位数会员卡号:");
        int a = sc.nextInt();
        int b=a/1000;
        int c=a/100-10*b;
        int d=a/10-100*b-10*c;
        int e=a%10;
        int sum=b+c+d+e;
        /*获取这个数字的每个位置上的值
        int ge = number % 10;
        int shi = number / 10 % 10;
        int bai = number / 100 % 10;
        int qian = number / 1000 % 10;
        int sum = ge + shi + bai + qian;*/
        System.out.println("会员卡号"+a+"各位之和:"+sum);
        System.out.println(sum>20?"会员卡号"+a+"是幸运顾客":"会员卡号"+a+"不是幸运顾客");
        System.out.println(0.1+0.2);
    }
}
